#include "Common.h"

Creature* MapInterface::SpawnCreature(ui32 entry, float x, float y, float z, float o, bool savetodb)
{
	Creature* cr = m_basehandler->CreateCreature(entry);
	if(!cr)
		return cr;
	cr->Load(entry);
	cr->Spawn(x, y, z, m_basehandler->GetMapId(), o);
	if(savetodb)
		cr->SaveToDb(true);
	return cr;
}

GameObject* MapInterface::SpawnGameObject(ui32 entry, float x, float y, float z, float o, bool savetodb)
{
	GameObject* go = m_basehandler->CreateGameObject(entry);
	if(!go)
		return go;
	go->Load(entry);
	go->Spawn(x, y, z, m_basehandler->GetMapId(), o, false);
	return go;
}